#include "pch.h"
#include<tchar.h>
char* mystrcat(char* str1, char* str2)
{
	int a = 0;
	int b = 0;
	char * c = str1;
	char * d = str2;
	while (*str1 != '\0')
	{
		a++;
		str1++;

	}
	while (*str2 != '\0')
	{
		b++;
		str2++;
	}
	char * e;
	e = (char*)malloc(sizeof(char)*(a + b));
	char * g = e;
	while (*c != '\0')
	{
		*e = *c;
		e++;
		c++;
	}
	while (*d != '\0')
	{
		*e = *d;
		e++;
		d++;
	}
	*e = '\0';




	return g;

}


TEST(TestCaseName, TestName) {
	EXPECT_STREQ("123", mystrcat("1", "23"));
	EXPECT_STREQ("abc", mystrcat("abc", ""));

}

int _tmain(int argc, _TCHAR * argv[])
{
	testing::InitGoogleTest(&argc, argv);
	RUN_ALL_TESTS();
	getchar();
	getchar();
	return 0;




}